package com.dangz.dans.entity;

/**
 * 通用响应对象, 封装数据如下
 */
public class CommonResponse<T> {
	private Meta meta;

	private T data;

	public CommonResponse(Meta meta, T data) {
		this.meta = meta;
		this.data = data;
	}

	public CommonResponse(String code, String message, T data) {
		this.meta = new Meta(code, message);
		this.data = data;
	}

	public CommonResponse(String code, String message) {
		this.meta = new Meta(code, message);
	}

	public Meta getMeta() {
		return meta;
	}

	public void setMeta(Meta meta) {
		this.meta = meta;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
	
	@Override
	public String toString() {
		return "response [meta=" + meta + ", data=" + data + "]";
	}
	

}
